Repository navigation
Conversation
… cancel on clear and validate calibration slots
… canvas by aspect ratio
…ess on its own timeout and simplify fullscreen editing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sprint 1A of DraftLens: the image-bearing foundation for vision work, plus the Sprint 1A.1
Vision Lab interaction redesign and its corrections.
FramePayload/OriginalFrame/ProcessedFrame/SlotImage.FrameTransformwith source/oriented/crop/processed round tripsfor all four rotations, including 180°/270° with crop and downscale.
unsupported-schema refusal, delete-as-escape-hatch.
processing, an interactive annotation canvas, a slot list and profile controls.
Not implemented (deliberately)
No OCR, no hero recognition, no automatic draft/ban/pick detection, no ML model, no network
client, no screenshot persistence, no
FLAG_SECURE. Annotations are manual calibration data,never detections. The Vision Lab shows "Detection: not implemented".
Sprint 1A.1 — annotation interaction redesign
The frame sizing and rendering fix is preserved. The user confirmed it working on a
physical device in portrait and landscape before this work started; the oriented bitmap
rendering, the image/overlay/normalized-coordinate mapping, the aspect-ratio behaviour, the
letterbox rejection and the responsive workspace were left as they are.
The gesture model is explicit.
AnnotationInteractionis a pure state machine, so twogestures can never compete and every rule is unit-tested:
A tap never moves anything. A drag on an unselected rectangle selects it and stops there, so
a drag can never move the wrong slot. A stationary long press is not a move. A drag on empty
space never creates a rectangle — creating requires the long press first.
The delete control replaced the top-right resize handle. The top-right handle is gone
and the X sits on exactly that corner, so the corner carries one control and not two. The
remaining handles — top-left, bottom-left, bottom-right — still change the width and the
height from either side.
The long press opens the menu immediately. It is detected on its own timeout rather than
waiting for a pointer event, so the menu no longer needs the finger to move first, and a
small movement afterwards neither delays nor repeats it.
The contextual property editor replaces the bottom controls. A long press opens a compact
editor next to the slot with BAN/PICK, ALLY/ENEMY/GLOBAL, the index and an optional label,
plus Copy, Paste and Duplicate. It positions itself inside the window, so it is never clipped
off-screen in either orientation, and it no longer occupies a permanent part of the canvas.
The old bottom property controls and the "Add slot" card with its hardcoded rectangle are
gone.
Copy, paste and duplicate use the application's own clipboard, never the Android system
clipboard. A pasted slot gets a new unique id, is offset a little, stays inside the image
and takes the next free index in its
(type, team)scope; the source is always preserved.Deletion and undo. Undo covers a deletion, a creation and a move or resize, and restores
the correct slot id and metadata.
The page no longer scrolls during annotation. The canvas takes the pointer from the first
touch, so moving, resizing and drawing a slot never scrolls the page. Scrolling stays
available everywhere else, and the fullscreen canvas is not inside a scrolling parent.
Fullscreen editing was simplified. Pinch-to-zoom, pan, Fit to screen and Reset zoom
were removed together with the view-transform state they needed. The entry is a compact
expand icon, the editor fills the screen with the aspect ratio preserved and the overlay
aligned, a compact collapse icon leaves it, and Android Back leaves the editor before the
Vision Lab. The orientation is never forced.
The slot list is grouped into ALLY · BAN, ENEMY · BAN, ALLY · PICK, ENEMY · PICK and
GLOBAL, with every row keyed by
key(slot.id). Tapping a row selects that rectangle on thecanvas and selecting a rectangle highlights its row. The store was already deleting by id;
the real risk was Compose list identity, which the stable keys remove, and a regression test
deletes the second of three slots and checks the others survive.
Slot colours. ALLY is blue, ENEMY is red, GLOBAL is neutral grey, and every rectangle
also carries a readable label, so colour is never the only cue. There is no fixed number of
bans or picks.
Tests
./gradlew test— 258 unit tests, 0 failures, 0 errors, 0 skipped (run in both the debugand release variants: 516 test executions).
Also in CI:
assembleAndroidTest, strictlint(abortOnError = true) andassembleDebug,with the
draftlens-debugAPK uploaded as a workflow artifact and the packaged manifestre-inspected for the foreground-service permissions and the
mediaProjectionservice type.Latest green run (branch head): https://github.com/xeriomy/DraftLens/actions/runs/43515376361
Head SHA
e1aca691e169a9109f972fb4ffd0d25e14cc8727Artifact
draftlens-debug, 10 213 689 bytesArtifact digest
sha256:82ca55b26978b23408866a338181047fe84b7612ad39b2cd7596f646a7b2cfe1APK SHA-256
447c6664c4dc72ba1a45aebe2dcfe94751d26366096fcd8153df3904cc4e477aInstrumentation tests are compiled, not executed — no device or emulator was used here.
Limitations
aapt2, so no Gradle taskthat touches resources can run locally. CI is the build of record.
rendering fix was confirmed by the user on a device; the gesture model, the delete control,
the long press, the contextual editor, the undo, the slot list and the fullscreen editor
were not.
not on the canvas itself.
Status
Draft — not merged.